<?php

namespace App\Http\Requests\Admin\V1;

class AdminIndexRequest extends FormRequest
{
    /**
     * @return \string[][]
     * @author 陈文小超
     * @maxim from专注to执行
     * @time 2021/3/24/10:56
     */
    public function rules()
    {
        return [
            'page' => ['bail', 'required', 'integer', 'min:1'],
            'size' => ['bail', 'nullable', 'integer', 'min:1', 'max:200'],
        ];
    }

    /**
     * @return array
     * @author 陈文小超
     * @maxim from专注to执行
     * @time 2021/3/24/10:56
     */
    public function messages()
    {
        return [
            'page.*' => trans('admin/v1/request.generals.page'),
            'size.*' => trans('admin/v1/request.generals.size'),
        ];
    }
}
